package com.whz.workmanageol.vo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Comparator;

public class StudentWorkVOComparator implements Comparator<StudentWorkVO> {

    private static final Logger logger = LoggerFactory.getLogger(StudentWorkVOComparator.class);
    @Override
    public int compare(StudentWorkVO o1, StudentWorkVO o2) {
        if(null == o1.getWork().getScore()) return -1;
        if(null == o2.getWork().getScore()) return 1;
        return o1.getWork().getScore().compareTo(o2.getWork().getScore());
    }
}
